<template>
  <div class="app-container">
    <el-row class="app-toolbar"><el-button type="primary" @click="_exportData">导出账单信息</el-button></el-row>
    <el-table v-loading="listLoading" :data="datas" :empty-text="empty_text" element-loading-text="Loading" border fit stripe highlight-current-row show-summary>
      <!-- <el-table-column type="selection" width="50"></el-table-column> -->
      <el-table-column label="序号" align="center" width="80">
        <template slot-scope="scope">
          {{ scope.$index + 1 }}
        </template>
      </el-table-column>
      <el-table-column label="订单号">
        <template slot-scope="scope">
          {{ scope.row.orderNo }}
        </template>
      </el-table-column>
      <el-table-column label="用户名称">
        <template slot-scope="scope">
          {{ scope.row.username }}
        </template>
      </el-table-column>
      <el-table-column label="已购商品数" prop="payCount" align="center" width="150">
        <template slot-scope="scope">
          {{ scope.row.payCount }}
        </template>
      </el-table-column>
      <el-table-column label="交易总金额" prop="totalPrice" align="center" width="210">
        <template slot-scope="scope">
          {{ scope.row.totalPrice }}
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" align="center" width="240">
        <template slot-scope="scope">
          <el-button type="text" @click="detailRow(scope.row)" size="small">交易详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      layout="total, sizes, prev, pager, next, jumper"
      :page-size="listPages.size"
      :current-page="listPages.page"
      :total="listPages.total"
      :page-sizes="listPages.sizes"
      @size-change="_page_size_change"
      @prev-click="_page_prev_click"
      @current-change="_page_current_change"
      @next-click="_page_next_click"
    ></el-pagination>
  </div>
</template>
<script src="./index.js"></script>
<style lang="scss" src="./index.scss"></style>
<style lang="scss" scoped src="./index.scoped.scss"></style>
